package com.zhouyibike.uu.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.ViewGroup;

import java.util.List;

/**
 * Created by Zy on 2017/10/11.
 */
public class MydanchevpAdapter extends FragmentPagerAdapter {

    private List<Fragment> views;

    public MydanchevpAdapter(FragmentManager fm,  List<Fragment> views) {
        super(fm);
        this.views = views;
    }

    @Override
    public Fragment getItem(int position) {
        return views.get(position);
    }

    @Override
    public int getCount() {
        return views.size();
    }

    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {
//        super.destroyItem(container, position, object);
    }

    //配置标题的方法
//    @Override
//    public CharSequence getPageTitle(int position) {
//        return title.get(position);
//    }
}
